<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>函数优化</title>
    <script>
        function hello(a, b) {
            a = a || 10;
            b = b || 6;
            console.log(a + "+" + b + "=" + (a = b))
        }

        function hi(a = 10, b = 20) {
            console.log(a + "+" + b + "=" + (a = b))
        }

        hello(0, 0)
        hi(0,0)
    </script>
</head>
<body>

</body>
</html>